home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16677 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.0 KB

  1. Path: news.mathworks.com!gatech!gt-news!prism!acmey!gt4558a
  2. From: gt4558a@acmey.gatech.edu (Rubicant)
  3. Newsgroups: comp.lang.c++,rec.games.programmer,alt.msdos.programmer,comp.programming
  4. Subject: Re: Young programmers read me.
  5. Followup-To: comp.lang.c++,rec.games.programmer,alt.msdos.programmer,comp.programming
  6. Date: 11 Apr 1996 18:46:56 GMT
  7. Organization: Georgia Institute of Technology
  8. Message-ID: <4kjk30$9g8@catapult.gatech.edu>
  9. References: <4icpp9$7hr@barad-dur.nas.com> <aidan-0404961557290001@meathook.intac.com> <3165AD94.6F3A@datalytics.com> <j-jahnke-0604960016160001@ntcs-ip8.uchicago.edu> <4keejc$lpi@tpd.dsccc.com> <Pine.OSF.3.91.960411093444.20958D-100000@bud.cc.swin.edu.au
  10. NNTP-Posting-Host: acmey-prism.gatech.edu
  11. X-Newsreader: TIN [version 1.2 PL2]
  12.  
  13. > <gfarrow.829193316@rainbow> <jsm16-1104960959080001@ups02.cit.cornell.edu>
  14. Organization: Georgia Institute of Technology
  15. Distribution: 
  16.  
  17. James Margaris (jsm16@cornell.edu) wrote:
  18. : In article <gfarrow.829193316@rainbow>, gfarrow@rainbow.rmii.com (Glenn
  19. : Farrow) wrote:
  20. :    It seems to me that addding a few extra lines is well worth the
  21. : readability. Matching up curly braces is so much easier when they are
  22. : indented to the same level.
  23.  
  24. :                                              James Margaris
  25.  
  26. Actually, another option for handling the curly braces is to immediately
  27. follow them with a comment describing the loop that is opening or closing.
  28. Make sure the comments are the same for the opening and closing, of course
  29. :).  I think that makes a much bigger difference in terms of readability
  30. than the white spaces, particularly in areas with alot of deep drawn-out
  31. nesting.  I don't care too much about my opening brace locations in a
  32. situation like this
  33.  
  34.             ...
  35.             Temp++;
  36.             Blit(Screen,Bank1,0,0,25,50);
  37.             }
  38.         }
  39.         }
  40.     }
  41.  
  42. but those comments REALLY make a difference.
  43.  
  44. --
  45. Choose thou not yet, boy, for day comes as night.
  46. Warriors of purity struggle as well
  47. Look, the horizon, the East, and the Light
  48. Witness as Purity challenges Hell.        ---Rubicant---
  49.